import { defineStore } from "pinia";
import {ref,reactive} from "vue"
export const userListStore = defineStore("userListStoreId", () => {
    const detailData = ref([
        {
            type:"text",
            prop:"username",
            name:"用户账号",
            value:null
        },
        {
            type:"text",
            prop:"nickname",
            name:"用户姓名",
            value:null
        },
        {
            type:"text",
            prop:"mobile",
            name:"手机号",
            value:null
        },
        {
            type:"text",
            prop:"email",
            name:"邮箱",
            value:null
        },
        {
            type:"text",
            prop:"enabled",
            name:"用户状态",
            value:null
        },
        {
            type:"text",
            prop:"provinceName",
            name:"所在地-省",
            value:null
        },
        {
            type:"text",
            prop:"cityName",
            name:"所在地-市",
            value:null
        },
        {
            type:"text",
            prop:"adress",
            name:"详细地址",
            value:null
        },
        {
            type:"text",
            prop:"blurb",
            name:"用户简介",
            value:null
        }
    
    
    ])
    const tableProp = reactive(
        {
            name: "userList",
            propsList: [
                {
                    label: '用户账号',
                    prop: 'username',
                    type: 'normal',
                    minWidth: '100px',
                    hidden: true,
                },
                {
                    label: '用户姓名',
                    prop: 'nickname',
                    type: 'normal',
                    minWidth: '100px',
                    hidden: true,
                },
                {
                    label: '是否启用',
                    prop: 'enabled',
                    type: 'custom',
                    minWidth: '100px',
                    slotName:'userEnabled',
                    hidden: true,
                },
                {
                    label: '手机号',
                    prop: 'mobile',
                    type: 'normal',
                    minWidth: '100px',
                    hidden: true,
                },
                {
                    label: '邮箱',
                    prop: 'email',
                    type: 'normal',
                    minWidth: '100px',
                    hidden: true,
                },
                {
                    label: '所在地-省',
                    prop: 'provinceName',
                    type: 'normal',
                    minWidth: '100px',
                    hidden: true,
                },
                {
                    label: '所在地-市',
                    prop: 'cityName',
                    type: 'normal',
                    minWidth: '100px',
                    hidden: true,
                },
                {
                    label: '详细地址',
                    prop: 'adress',
                    type: 'normal',
                    minWidth: '100px',
                    hidden: true,
                },
                {
                    label: '用户简介',
                    prop: 'blurb',
                    type: 'normal',
                    minWidth: '100px',
                    hidden: true,
                },
                {
                    type: 'handle',
                    label: '操作',
                    minWidth: '250px',
                    btnType: ' link',
                    slotName: 'handle',
                    hidden: true,
                }
            ]
    })
    
    return {
        detailData, tableProp
    }
})